package com.alibaba.citrus.cr.sales.plan.api.setting.contract;

import com.alibaba.citrus.cr.sales.plan.dto.api.request.MonthContractAndRollingCountResponse;
import com.alibaba.citrus.cr.sales.plan.dto.api.request.PageQueryContractRequest;
import com.alibaba.citrus.cr.sales.plan.dto.api.request.QueryContractByCustomerDimensionRequest;
import com.alibaba.citrus.cr.sales.plan.dto.api.request.QueryContractRequest;
import com.alibaba.citrus.cr.sales.plan.sdo.ContractSDO;
import com.alibaba.cz.base.tool.page.PageResult;
import com.alibaba.lattice2.epoch.meshflow.model.annotation.MeshFlowService;
import com.alibaba.lattice2.epoch.sdk.model.Result;

import java.util.List;

/**
 * @author wangyibing
 */
@MeshFlowService(apps = {"bc_order"}, name = "contractQueryService")
public interface ContractQueryService {

    /**
     * 分页查询合同量列表
     *
     * @param contractRequest
     * @return
     */
    Result<PageResult<List<ContractSDO>>> pageQueryContractList(PageQueryContractRequest contractRequest);

    /**
     * 通过id查询合同量详情
     *
     * @param queryContractRequest
     * @return
     */
    Result<ContractSDO> queryContractById(QueryContractRequest queryContractRequest);

    /**
     * 批量查询年月客户地址-货品的合同量
     *
     * @param conditionRequest
     * @return
     */
    Result<List<MonthContractAndRollingCountResponse>> queryQuantityListByAddressAndScItem(QueryContractByCustomerDimensionRequest conditionRequest);

    /**
     * 查询部门-货品合同量和红线量
     *
     * @param contractRequest
     * @return
     */
    Result<PageResult<List<ContractSDO>>> queryDepartmentContractWithRedCount(PageQueryContractRequest contractRequest);

}
